home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
cnet
/
wtc1_5.lha
/
wtc1_5.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-04-24
|
4KB
|
107 lines
/*
-:- World Time Check v1.5 -:-
I will make a version that supports each and every time zone on the face
of the earth soon. Just give me a little time. <Grin>
*/
Options results
Changewhere 'World Time'
Lhour = Time();day = date();dow = date('w');parse var lhour 1 hour 3 junk 4 min 6 junk1 7 secs +2;Local = time('H')
/* Local offset from GMT
(I.E. -8 L.A., -7 denver, -6 chicago, -5 New York, 0 - london, 1 Germany + 10 sydney) */
admin = ':'min
OS = +10 /* Half zones note: round up for + times zones and down for - time zones.
I don't know, test it out. */
MO = 0 /* Minute Offset for those of you in "half time" zones \
\ if you do not live in a half time zone, set this to 0 */
if mo > 0 then call offset
test = 0;if test = 1 then do;Query 'Gmt = ';GMT = result;call gmtt;end
GMT = local - OS
gmtt:
if GMT > 24 then do;GMT = GMT - 24;end
if GMT < 0 then do;GMT = GMT + 24;end
min = ':'min
Zones:
Tz = Gmt;call sub;ltz=tz;lta=ta
TZ = GMT - 1;call sub;ztz =tz;zta=ta
TZ = GMT - 2;call sub;Stz =tz;Sta=ta
TZ = GMT - 3;call sub;Rtz =tz;Rta=ta
TZ = GMT - 4;call sub;Btz =tz;Bta=ta
TZ = GMT - 5;call sub;Etz =tz;Eta=ta
TZ = GMT - 6;call sub;Ctz =tz;Cta=ta
TZ = GMT - 7;call sub;Mtz =tz;Mta=ta
TZ = GMT - 8;call sub;Ptz =tz;Pta=ta
TZ = GMT - 9;call sub;Atz =tz;Ata=ta
TZ = GMT - 10;call sub;Htz =tz;Hta=ta
TZ = GMT - 11;call sub;ITZ = tz;ITa=ta
TZ = GMT + 1;call pos;FTZ = tz;FTa=ta
TZ = GMT + 2;call pos;OTZ = tz;oTa=ta
TZ = GMT + 3;call pos;wTZ = tz;wTa=ta
TZ = GMT + 4;call pos;tTZ = tz;tTa=ta
TZ = GMT + 5;call pos;kTZ = tz;kTa=ta
TZ = GMT + 6;call pos;NTZ = tz;nTa=ta
TZ = GMT + 7;call pos;VTZ = tz;VTa=ta
TZ = GMT + 8;call pos;qTZ = tz;qTa=ta
TZ = GMT + 9;call pos;yTZ = tz;yTa=ta
TZ = GMT + 10;call pos;xTZ = tz;xTa=ta
TZ = GMT + 11;call pos;jTZ = tz;jTa=ta
TZ = GMT + 12;call pos;dTZ = tz;dTa=ta
Display:
transmit 'f1n2 z1cf'center('-:- World Time Clock v 1.5a -:-',78)'z0n1'
transmit ' z4 cfLondon 'right(LTZ||MIN||LTA,7)' z0 z4 cfBerlin 'right(ftz||MIN||FTA,7)' z0'
transmit ' ceAzores 'right(ZTZ||MIN||ZTA,7)' ceCairo 'right(otz||MIN||oTA,7)
transmit ' z4 cfGrytviken 'right(STZ||MIN||STA,7)' z0 z4 cfMoscow 'right(wtz||MIN||wTA,7)' z0'
transmit ' ceRio 'right(RTZ||MIN||RTA,7)' ceTeheran 'right(Ttz||MIN||TTA,7)
transmit ' z4 cfBermuda 'right(BTZ||MIN||BTA,7)' z0 z4 cfKarachi 'right(Ktz||MIN||KTA,7)' z0'
Transmit ' ceNew York 'right(ETZ||MIN||ETA,7)' ceTashkent 'right(ntz||MIN||nTA,7)
Transmit ' z4 cfChicago 'right(CTZ||MIN||CTA,7)' z0 z4 cfJakarta 'right(vtz||MIN||vTA,7)' z0'
Transmit ' ceDenver 'right(MTZ||MIN||MTA,7)' ceBeijing 'right(qtz||MIN||qTA,7)
Transmit ' z4 cfLos Angeles 'right(PTZ||MIN||PTA,7)' z0 z4 cfTokyo 'right(ytz||MIN||yTA,7)' z0'
Transmit ' ceAnchorage 'right(ATZ||MIN||ATA,7)' ceSydney 'right(xtz||MIN||xTA,7)
Transmit ' z4 cfHonolulu 'right(HTZ||MIN||HTA,7)' z0 z4 cfCaroline is. 'right(jtz||MIN||jTA,7)' z0'
Transmit ' ceMidway Is. 'right(ITZ||MIN||ITA,7)' ceMarshall is. 'right(dtz||MIN||dTA,7)
transmit 'n1 cf Local Time cb'right(time(),9)' cfLocal Date:c3 'day', a 'DOW'n1'
transmit 'c3Press any key...g0'
exit
sub:
TA = 'am'
if TZ < 0 then do; TZ = TZ + 24; end
if TZ = 24 then do;tz = tz -24;TA='am';end
if TZ > 12 then do;TZ = TZ - 12 ;TA='pm';end
if TZ = 12 then do;TA = 'pm';end
if TZ = 0 Then TZ = 12
return
Pos:
TA = 'am'
if TZ > 24 then do; TZ = TZ - 24; end
if TZ = 24 then do; TZ = TZ - 24; end
if TZ > 12 then do;TZ = TZ - 12 ;TA='pm';end
if TZ = 12 then do;TA = 'pm';end
if TZ = 0 Then TZ = 12
return
offset:
min = min + mo
if min > 60 then do ;min = min - 60;os=os-1;end
if min = 0 then min = '00'
if min <10 then min = '0'min
if min = 60 then do;min = '00';os = os -1;end
return